package com.huanuo.internetofthings.service.impact;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.unicorn.framework.base.base.AbstractService;
import org.unicorn.framework.core.SysCode;
import org.unicorn.framework.core.exception.PendingException;

import com.huanuo.internetofthings.bo.impact.ImpactDeviceStatistics;
import com.huanuo.internetofthings.dao.impact.ImpactDeviceStatisticsMapper;

@Service
public class ImpactDeviceStatisticsService extends AbstractService {

	@Autowired
	private ImpactDeviceStatisticsMapper impactDeviceStatisticsMapper;

	/**
	 * 查询设备统计列表
	 * 
	 * @param impactDeviceStatistics
	 * @return
	 * @throws PendingException
	 */
	public List<ImpactDeviceStatistics> getImpactDeviceStatisticsList(ImpactDeviceStatistics impactDeviceStatistics)
			throws PendingException {
		try {
			return impactDeviceStatisticsMapper.selectList(impactDeviceStatistics);
		} catch (Exception e) {
			error("查询设备统计列表失败", e);
			throw new PendingException(SysCode.DB_ERROR, "查询设备统计列表失败");
		}
	}
}